<%= content_for :css do %>
  <style>
    #content {
      width: 1000px;
      margin: 0 auto;
    }
    #content .content-list {
      position: relative;
    }
  </style>
<% end %>


<div id="content">
  <hr>
  <div class="content-list">

    <table class="table">
      <tr>
        <th>社团名称</th>
        <th>人数</th>
        <th>创建时间</th>
        <th>是否加入</th>
      </tr>

      <div id="content">
        <div class="content-list">
          <ul>
            <% @societies.each do |e| %>
              <tr>
                <td style="width: 300px;">
                  <a href="/index/society/<%= e.id %>" class="list_title">
                    <%= e.name%> 
                  </a>
                </td>
                <td style="width: 300px;"><%= e.num_of_people %></td> 
                <td style="width: 600px;"><%= e.create_time.to_s[0..10] %></td>
                <td style="width: 300px;">
                  <%= button_to "申请加入", '/index/society/joinSociety', method: :put %>
                </td>
              <tr>
            <% end %>
          </ul>
        </div>
      </div>
    </table>
    <div class="digg_pagination">
      <%= will_paginate @societies, :container => false %>
    </div>
  </div>
</div>